import request from '@/utils/request';
import { AxiosPromise } from 'axios';


export function getscheduletaskpagelist(data:any) {
    return request({
      url: `/api/schedule-task/schedule`,
      method: 'get',
      params:data
    })
  }
  export function addscheduletask(data:any) {
    return request({
      url: `/api/schedule-task/schedule`,
      method: 'post',
      data:data
    })
  }

  export function pausescheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/pause/${sid}`,
      method: 'get',
    })
  }
  export function startscheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/start/${sid}`,
      method: 'get',
    })
  }

  export function runoncescheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/runonce/${sid}`,
      method: 'get',
    })
  }
  
  export function resumescheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/resume/${sid}`,
      method: 'get',
    })
  }
  
  export function stopscheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/stop/${sid}`,
      method: 'get',
    })
  }
  
  export function deletescheduletask(sid:string) {
    return request({
      url: `/api/schedule-task/schedule/${sid}`,
      method: 'delete',
    })
  }
  
  export function getscheduleinfo(id:string) {
    return request({
      url: `/api/schedule-task/schedule/${id}`,
      method: 'get'
    })
  }
  
  export function editscheduletask(data:any) {
    return request({
      url: `/api/schedule-task/schedule`,
      method: 'put',
      data: data
    })
  }
  
  export function getschedulelogpagelist(data:any) {
    return request({
      url: `/api/schedule-task/schedule/log`,
      method: 'get',
      params:data
    })
  }
  